<?php /* Copyright 2010 Karl R. Wilcox 

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License. */


function makeChg_music ( $node ) {
  $charge_data = array (
'clarion' => array ( 'width' => 304, 'height' => 400,  'body' => '<g stroke="#000000" stroke-width="3" >
        <path d="M 11.9,119 C 11.9,119 10.8,38 11.3,18.7 16.4,5.66 51,1.11 62.3,17.6 61.7,39.1 62.9,118 62.9,118 l -51,1 z"   />
        <path d="M 71,119 C 71,119 69.9,38 70.4,18.7 75.5,5.66 110,1.11 121,17.6 c 0,21.5 1,100.4 1,100.4 l -51,1 z"   />
        <path d="m 129,119 c 0,0 -1,-81 -1,-100.3 6,-13.04 40,-17.59 51,-1.1 0,21.5 1,100.4 1,100.4 l -51,1 z"   />
        <path d="m 187,119 c 0,0 -1,-81 -1,-100.3 6,-13.04 40,-17.59 51,-1.1 0,21.5 1,100.4 1,100.4 l -51,1 z"   />
        <path d="m 245,119 c 0,0 -1,-81 -1,-100.3 6,-13.04 40,-17.59 51,-1.1 0,21.5 1,100.4 1,100.4 l -51,1 z"   />
        <rect width="295" height="15.9" x="3.39" y="119"   />
        <path d="m 294,137 -281.5,-2 0,67 c 0,0 20.4,14 26.6,20 18.7,-20 65.9,-33 116.9,-33 46,7 51,73 52,106 -29,53 -74,63 -85,51 -11,-12 11,-30 5,-41 -23,-50 -70.2,-24 -82.1,-2 -4.6,10 -3.4,49 11.3,63 42.5,41 105.8,31 130.8,29 96,-35 91,-93 98,-124 10,-45 8,-135 8,-134 z"   />
        <path d="M 13,204 C 88.4,167 148,180 155,188"   />
        <path d="M 38.5,56.6 39.1,110"   />
        <path d="M 47.6,43.6 48.7,108"   />
        <path d="m 55.5,31.2 0,80.8"   />
        <path d="M 94.5,56.6 95.1,110"   />
        <path d="m 104,43.6 1,64.4"   />
        <path d="m 112,31.2 0,80.8"   />
        <path d="m 157,56.6 0,53.4"   />
        <path d="m 166,43.6 1,64.4"   />
        <path d="m 174,31.2 0,80.8"   />
        <path d="m 213,56.6 0,53.4"   />
        <path d="m 222,43.6 1,64.4"   />
        <path d="m 230,31.2 0,80.8"   />
        <path d="m 273,56.6 0,53.4"   />
        <path d="m 282,43.6 1,64.4"   />
        <path d="m 290,31.2 0,80.8"   />
        <path d="m 256,171 0,130"   />
        <path d="m 266,156 -1,156"   />
        <path d="m 279,142 -4,153"   />
        <path d="m 23.2,205 18.1,11"   />
        <path d="m 31.2,201 12.4,12"   />
        <path d="m 39.7,198 10.7,10"   />
        <path d="m 44.2,195 10.2,10"   />
        <path d="m 52.1,193 10.2,8"   />
        <path d="m 58.3,190 10.8,8"   />
        <path d="m 66.8,188 8,8"   />
        <path d="m 74.8,187 8.5,7"   />
        <path d="m 84.4,186 5.1,7"   />
        <path d="m 91.8,184 3.9,5"   />
        <path d="m 101,182 4,5"   />
        <path d="m 113,182 21,2"   />
        <path d="m 108,185 14,1"   />
        <path d="M 113,309 C 61.7,249 38.5,354 80.5,370"   />
        <path d="M 113,309 C 61.7,249 38.5,354 80.5,370"   />
        <path d="M 107,317 C 71.5,279 55.5,345 84.4,355"   /></g>
', ),
'harp' => array ( 'width' => 306, 'height' => 348,  'body' => '<g stroke="#000000" stroke-width="3" ><path fill-rule="evenodd" d="m 21.5,40.9 c 0,0 12.5,20.4 17.6,40.2 C 45.3,245 212,299 224,309 c 4,-1 -17,-10 -17,-10 l 0,14 -7,-2 1,7 31,27 38,-12 -9,-13 31,-259.3 7,-3.4 -2,-7.9 c 0,0 24,-27 -13,-39.65 C 263,9.02 225,11.5 225,11.5 128,35.2 109,59.6 21.5,40.9 z M 55,89.1 C 79.3,215 163,267 215,277 225,242 268,60.2 268,60.2 l -7,-9.7 6,-2.2 c 0,0 -14,-14.2 7,-28.9 -8,0 -47,0 -47,0 C 161,40.9 90.1,90.8 55,89.1 z"   />
  <path fill="none" d="M 104,73.2 241,209 M 117,69.8 245,193 M 128,65.8 249,179 M 138,60.7 252,164 M 150,53.9 252,150 M 165,46.6 258,133 M 179,40.3 260,118 M 190,34.1 264,105"   />
  <path d="m 207,313 22,17 32,-11"   />
  <path d="M 232,346 231,329 276,68.1"   />
  <path d="m 267,62.4 12,6.3 21,-11.9"   />
  <path d="m 276,21.6 c 18,-5.3 28,21.3 12,21.2 6,-16.1 -13,-20.6 -12,-21.2 z"   />
  <path d="m 267,48.3 c 12,14 32,3.6 31,2"   /></g>
', ),
'horn' => array ( 'width' => 288, 'height' => 303,  'body' => '<g stroke="#000000" stroke-width="3" fill-rule="evenodd" >
        <path d="m 12.1,162 c 1,69 55.1,134 142.9,139 133,-19 120,-134 124,-137 -34,-4 -48,-2 -76,-1 -2,16 -9,85 -80,87 -58.9,-5 -91.2,-36 -83.1,-86 -14.1,-2 -29.8,-2 -27.8,-2 z"   />
        <path d="M 49,151 A 23.2,12.4 0 0 1 2.52,151 23.2,12.4 0 1 1 49,151 z"   />
        <path d="m 286,148 a 45,27 0 0 1 -90,0 45,27 0 1 1 90,0 z"   />
        <path d="m 37.9,150 a 12.7,5.57 0 1 1 -25.3,0 12.7,5.57 0 1 1 25.3,0 z" fill="#333333"   />
        <path d="m 275,147 a 34.1,17.9 0 1 1 -68,0 34.1,17.9 0 1 1 68,0 z" fill="#333333"   />
        <path d="m 45.9,184 a 2.85,20.1 82 0 1 -39.6,6 2.85,20.1 82 0 1 39.6,-6 z"   />
        <path d="M 116,91.4 C 114,166 67.4,209 61.1,223 c 6.2,6 9.2,8 16.2,12 C 125,172 127,96.4 127,97.4 c 0,1 -10,-5 -11,-6 z"   />
        <path d="M 67.7,223 A 3.18,22.4 47.3 1 1 34.9,253 3.18,22.4 47.3 0 1 67.7,223 z"   />
        <path d="M 73.7,229 A 3.19,22.5 40 0 1 44.9,263 3.19,22.5 40 1 1 73.7,229 z"   />
        <path d="m 119,246 a 3.43,27.6 3.67 1 1 -4,55 3.43,27.6 3.67 0 1 4,-55 z"   />
        <path d="m 130,247 a 27.6,3.42 88.3 0 1 2,55 27.6,3.42 88.3 1 1 -2,-55 z"   />
        <path d="m 136,91.5 c 2,75.5 37,117.5 42,132.5 -5,6 -7,7 -13,12 -35,-64 -37,-139.3 -37,-138.3 0,1 7,-5 8,-6.2 z"   />
        <path d="m 164,233 a 38.3,4.85 47.9 1 1 51,57 38.3,4.85 47.9 0 1 -51,-57 z"   />
        <path d="m 173,228 a 38.1,4.82 39.6 0 1 59,48 38.1,4.82 39.6 1 1 -59,-48 z"   />
        <path d="m 191,188 a 45,4.77 8.35 0 1 89,13 45,4.77 8.35 1 1 -89,-13 z"   />
        <path d="M 111,70.5 C 82.8,55.1 82,45 69.6,45.5 42.5,52.3 42.2,78.1 53.6,100 c 14.2,16 31.7,15 40,7 5,-24.4 19.4,-20.8 19.4,-20.8 l -3,-7.5 c 0,0 -20,0.4 -22.5,6.1 -14.7,22.2 -15.7,6 -22.2,-1.1 -10.7,-21.8 19,-15 22.2,-9.3 3.2,5.7 25.5,7.2 25.5,7.2 l -2,-11.1 z"   />
        <path d="m 179,110 c 8,35 1,27 9,34 9,7 0,13 -8,12 -8,0 -17,-62.7 -14,-58.3 2,4.3 12,13.3 13,12.3 z"   />
        <path d="m 148,70.5 c 28,-15.3 29,-25.4 41,-25 28,6.8 28,32.6 17,54.2 C 191,116 174,115 166,107 161,82.7 146,86.2 146,86.2 l 3,-7.5 c 0,0 20,0.3 23,6 14,23.3 15,6.1 22,-1 10,-21.7 -19,-15 -22,-9.2 -4,5.7 -25,7 -25,7 l 1,-11 z"   />
        <path d="m 149,76 a 19.1,22 0 1 1 -38,0 19.1,22 0 1 1 38,0 z"   />
        <path d="m 111,70.1 4,-9.3 C 115,60.8 92.5,35.1 97.5,28 103,20.9 154,8.71 152,24.1 150,39.4 138,55.8 138,55.8 l 10,11.8 c 0,0 25,-44.3 19,-53.5 C 157,-2.71 92.5,-0.86 87.5,14.8 81.6,33.4 85,51.6 92.5,58.3 100,65.1 110,70.8 111,70.1 z"   />
        <path d="m 83.6,112 c -8.3,35 -0.4,27 -9,34 -8.5,7 0,13 8.2,12 8.3,0 16.5,-62.5 14,-58.2 C 94.3,104 84.3,113 83.6,112 z"   /></g>', )
    );
  $type = $node->get_attribute('subtype');
  if ( isset($charge_data[$type]) ) {
      return $charge_data[$type];
  } else {
    my_trigger_error ( "No music $type", E_USER_WARNING, __FILE__, __LINE__ );
    return null;
  }
}
?>
